
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state:{
        username: localStorage.getItem('username') || ''
    },
    mutations:{
        saveUserName(state,ploy){
            state.username = ploy.username
        }
    }
})

export default store